package edu.ustb.sql.sleuth.entity;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author ShiZhe
 * @create 2020-10-17 9:03
 *
 */
@Data
@Entity
@Table(name = "zipkin_spans")
public class ZipkinSpans {
    @Id
    private Long trace_id;
    private Long id;
    private String name;
    private Long parent_id;
    private Long start_ts;
    private Long duration;
    private String date;

    public Long getTrace_id() {
        return trace_id;
    }

    public void setTrace_id(Long trace_id) {
        this.trace_id = trace_id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParent_id() {
        return parent_id;
    }

    public void setParent_id(Long parent_id) {
        this.parent_id = parent_id;
    }

    public Long getStart_ts() {
        return start_ts;
    }

    public void setStart_ts(Long start_ts) {
        this.start_ts = start_ts;
    }

    public Long getDuration() {
        return duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "ZipkinSpans{" +
                "trace_id=" + trace_id +
                ", id=" + id +
                ", name='" + name + '\'' +
                ", parent_id=" + parent_id +
                ", start_ts=" + start_ts +
                ", duration=" + duration +
                ", date='" + date + '\'' +
                '}';
    }
}
